package factoryp;

public class CarFactory {
    public CarInterface  getCar(String brandName){
        if (brandName==null){
            return null;
        }
        if (brandName.equalsIgnoreCase("Audi")){return new Audi();}else
        if (brandName.equalsIgnoreCase("BMW")){return new BMW();}else
        if (brandName.equalsIgnoreCase("Tesla")){return new Tesla();}
        return null;

    }
}
